
import { JsonUtil } from "db://app-game/core/utils/JsonUtil";

export class TableStaticCreature {
    static TableName: string = "StaticCreature";

    public data: any;

    init(id: number) {
        var table = JsonUtil.get(TableStaticCreature.TableName);
        this.data = table[id];
        this.id = id;
    }

    /** 编号【KEY】 */
    id: number = 0;

    /** 名称 */
    get name(): string {
        return this.data.name;
    }
    /** 描述 */
    get description(): string {
        return this.data.description;
    }
    /** 掉落物品 */
    get droppedItems(): any {
        return this.data.droppedItems;
    }
    /** 碰撞盒子 */
    get collisionBox(): any {
        return this.data.collisionBox;
    }
    /** 精灵图 */
    get spriteFrame(): string {
        return this.data.spriteFrame;
    }
    /** 精灵图阴影 */
    get shadowSpriteFrame(): string {
        return this.data.shadowSpriteFrame;
    }
}
    